package top.vanchor.myblog2back.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author Ding
 * @since 2021-11-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class BlogComment implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 评论ID
     */
    @TableId(value = "comment_id", type = IdType.AUTO)
    private Integer commentId;

    /**
     * 上级评论ID
     */
    private Integer commentPid;

    /**
     * 博客ID
     */
    private Integer commentBlogId;

    /**
     * 用户ID
     */
    private Integer commentUserId;

    /**
     * 评论内容
     */
    private String commentContent;

    /**
     * 创建时间
     */
    private LocalDateTime commentDatetime;

    /**
     * 查询字段
     */
    private String commentSearch;

    @TableField(exist = false)
    private Integer isUsed = 0;

    @TableField(exist = false)
    private List<BlogComment> comments = new ArrayList<>();

    @TableField(exist = false)
    private String userName;

    @TableField(exist = false)
    private String userAvatar;

    @TableField(exist = false)
    private String replyUserName;

    @TableField(exist = false)
    private Integer isLike;

    @TableField(exist = false)
    private Integer likeNum;

    @TableField(exist = false)
    private String replyUserPhone;

    @TableField(exist = false)
    private String userPhone;

    @TableField(exist = false)
    private Boolean needShow = true;


}
